﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="~/Community/FacePage.aspx.cs" Inherits="Community_FacePage" Title="Untitled Page" %>

<%@ MasterType VirtualPath="~/MainMaster.master" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<%@ Register Assembly="CKFinder" Namespace="CKFinder" TagPrefix="CKFinder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainTable" runat="Server">

<style type="text/css">
 .formnew_left
{
	width: 85%;
	float: left;
	margin: 3% 1% 4% 1%;
	padding-bottom: 10px;
}
</style>
    <script src="../includes/CKEditor/ckeditor.js"></script>

    <script src="../includes/CKEditor/adapters/jquery.js"></script>

    <script>
        var finder = new CKFinder();
        finder.basePath = '/ckfinder/';
        finder.create();
    </script>

    <script>
          function ShowFileInfo(fileUrl) {
            alert('The selected file URL is "' + fileUrl + '"');
        }

    </script>

    <script>
        ShowValue = function () {
             var msg1 = "Access Denied ! You must be logged in as a Doctor or Dentist for Access.";
            var msg2 = "On Return to the Home Page, please log in now with your email ID and your assigned Pass-Word (temp1234)";

                alert(msg1 + "\r\n" + "\r\n" + msg2)
           
        }
 
    </script>
<script type="text/javascript">


function wash( anInput ){
 
if(anInput.value == anInput.defaultValue) anInput.value = '';
}
function checkWash( anInput ){
if(anInput.value == '') anInput.value = anInput.defaultValue;
}





</script>

<script type="text/javascript">
    window.onload = function () {
        var seconds = 3;
        setTimeout(function () {
           document.getElementById("<%=lblMessage.ClientID %>").style.display = "none";
        }, seconds * 1000);
    };
</script>

    <div class="heading_inner">
        <div class="heading_topic">
            <h2>
                <asp:Label ID="lblBlockOwner" runat="server" Text=""></asp:Label></h2>
        </div>
    </div>
    <div class="cl">
    </div>
    <div>
        <table>
            <tr>
                <td>
                    <br />
                    <asp:GridView DataKeyNames="Id" ID="grgInvitationMsg" PageSize="5" runat="server"
                        AutoGenerateColumns="False" ShowFooter="True" CssClass="normalgrey_12" Width="100%"
                        AllowPaging="True" HorizontalAlign="Left" OnPageIndexChanging="grgInvitationMsg_PageIndexChanging"
                        OnRowCommand="grgInvitationMsg_RowCommand" OnRowDataBound="grgInvitationMsg_RowDataBound"
                        OnRowDeleting="grgInvitationMsg_RowDeleting">
                        <Columns>
                            <asp:TemplateField HeaderText="Name">
                                <HeaderStyle HorizontalAlign="Left" />
                                <ItemStyle Width="700px" VerticalAlign="Top" />
                                <ItemTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td width="100%">
                                                <%# Eval("FacePageMessage") %></u> </b></a>
                                            </td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Delete">
                                <ItemTemplate>
                                    <asp:LinkButton CommandArgument="id" CommandName="Delete" ID="lnkDelete" runat="server"><img src="../images/delete.gif" border="0" alt="Delete Record" /> 
                                    </asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                                <HeaderStyle Width="15%" HorizontalAlign="Center" />
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle HorizontalAlign="Left" />
                        <FooterStyle HorizontalAlign="Left" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <!--**Content 1 Starts Here**-->
    <div class="formnew_left" style="background-color: #f4f4f4;">
        <div style="width: 98%; padding: 1%; height: auto">
            <table width="826px" border="0" cellpadding="0" cellspacing="0" bgcolor="#f1f1f1">
                <tr>
                    <td style="width: 9px; height: 7px;" class="bodytxt" align="center">
                        <img src="../images/grey-curver-inside-left.gif" alt="" width="9" height="8" />
                    </td>
                    <td class="bodytxt" style="border-top: 1px solid #E0E0E0; width: 531px; height: 7px;"
                        align="center">
                        <img src="../Images/spacer.gif" alt="" width="8" height="1" />
                    </td>
                    <asp:Label runat="server" ID="lblMessage" Visible="False" ForeColor="Green" Width="400px"></asp:Label>
                    <td style="width: 10px; height: 7px;" class="bodytxt" align="center">
                        <img src="../images/grey-curver-inside-right.gif" alt="" width="9" height="8" />
                    </td>
                </tr>
                <tr>
                    <td class="bodytxt" style="border-left: 1px solid #E0E0E0;">
                        <img src="../images/spacer.gif" alt="" width="8" height="1" />
                    </td>
                    <td class="bodytxt" align="center">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="center" class="bodytxt" style="width: 516px;">
                                    <br />
                                    <span id="ctl00_MainTable_lblMsg"></span>
                                    <br />
                                </td>
                            </tr>
                            <tr valign="top">
                                <td colspan="2" align="left">
                                    <table width="100%" border="0" cellspacing="2" cellpadding="0">
                                        <tr>
                                            <td align="center">
                                                <span id="ctl00_MainTable_lblMessage" style="color: Red;"></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <br />
                                                <asp:GridView DataKeyNames="Id" ID="grdMessages" PageSize="5" runat="server" AutoGenerateColumns="False"
                                                    ShowFooter="True" CssClass="normalgrey_12" Width="100%" AllowPaging="True" HorizontalAlign="Left"
                                                    OnPageIndexChanging="grdMessages_PageIndexChanging" OnRowCommand="grdMessages_RowCommand"
                                                    OnRowDataBound="grdMessages_RowDataBound" OnRowDeleting="grdMessages_RowDeleting" BorderColor="#cccccc" >
                                                    <Columns>
                                                     <asp:TemplateField HeaderText="Inbox">
                                                     
                                                            <ItemTemplate>
                                                                <asp:LinkButton CommandArgument='<%# Eval("ID") %>' CommandName="Read" ID="lnkRead"
                                                                    runat="server"><img src="../images/read.jpg" border="0" alt="View detail"  /> 
                                                                </asp:LinkButton>
                                                                <asp:LinkButton CommandArgument='<%# Eval("ID") %>' CommandName="Read" ID="btnHaveRead"
                                                                    runat="server" Visible="false"><img src="../images/haveRead.jpg" border="0" alt="View detail"  /> 
                                                                </asp:LinkButton>
                                                            </ItemTemplate>
                                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                                            <HeaderStyle Width="6%" HorizontalAlign="Center" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="Message Title" DataField="FacePageTitle">
                                                        <ItemStyle Width="50%" />
                                                            <HeaderStyle HorizontalAlign="Center"  />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Sender" DataField="senderName">
                                                        <ItemStyle Width="20%" />
                                                            <HeaderStyle HorizontalAlign="Center"  />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Date" DataField="FacePagePostedDate" >
                                                        <ItemStyle Width="35%" HorizontalAlign="Center"/>
                                                            <HeaderStyle HorizontalAlign="Center"  />
                                                        </asp:BoundField>
                                                       
                                                        <asp:TemplateField HeaderText="Reply">
                                                            <ItemTemplate>
                                                                <asp:LinkButton CommandArgument='<%# Eval("ID") %>' CommandName="Reply" ID="lnkEdit"
                                                                    runat="server"><img src="../images/reply.jpg" border="0" alt="Reply" />
                                                                </asp:LinkButton>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                            </FooterTemplate>
                                                            <HeaderStyle Width="10%" HorizontalAlign="Center" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Delete">
                                                            <ItemTemplate>
                                                                <asp:LinkButton CommandArgument="id" CommandName="Delete" ID="lnkDelete" runat="server"><img src="../images/delete.gif" border="0" alt="Delete Record" /> 
                                                                </asp:LinkButton>
                                                            </ItemTemplate>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <HeaderStyle Width="10%" HorizontalAlign="Center" />
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <RowStyle HorizontalAlign="Left" />
                                                    <FooterStyle HorizontalAlign="Left" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                         </table>
                                         <div id="ckEditBlock" runat="server" visible="false">
                                         <table>
                                         
                                        <tr style="height: 25px;">
                                            <td>
                                                   <font color="#1F4A73" >
                                                    <asp:Label  ID="lblPostTitle" runat="server"></asp:Label>
                                                    </font>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" style="height: 24px">
                                                <asp:TextBox runat="server" Text="Subject:" ID="txtFacePageTitle" Width="530px" onfocus="wash(this);" onblur="checkWash(this);"></asp:TextBox>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td style="width: 740px">
                                                <CKEditor:CKEditorControl ID="txtDescription" Text=""  runat="server"
                                                    Height="150" Width="700"  DialogButtonsOrder="Ltr" ToolbarLocation="Bottom" 
                                                    ToolbarStartupExpanded="False"  onfocus="wash(this);" onblur="checkWash(this);"></CKEditor:CKEditorControl>
                                              
                                                <CKFinder:FileBrowser ID="FileBrowser1" BasePath="../includes/ckfinder" SelectFunction="ShowFileInfo"
                                                    Height="250" runat="server">
                                                </CKFinder:FileBrowser>
                                                <asp:TextBox ID="txtDescription1" runat="Server" CssClass="generaltext1" Style="width: 400px;
                                                    height: 80px" TextMode="multiline" Visible="false"></asp:TextBox>
                                            </td>
                                        </tr>
                                          <tr>
                                            <td align="left" style="height: 24px">
                                                <asp:TextBox runat="server" ID="txtPostReply" Style="width: 400px; height: 80px"
                                                    Font-Italic="True" TextMode="multiline" ForeColor="Red" Font-Names="Verdana"
                                                    Height="53px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 640px">
                                            <asp:LinkButton ID="btnSubmitt"  runat="server" OnClick="btnSubmitt_Click"><img src="../images/sendNow.jpg" border="0" alt="Delete Record" /> 
                                                        </asp:LinkButton>
                                              
                                            </td>
                                        </tr>
                                       
                                        
                                    </table>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" class="bodytxt" style="width: 516px; height: 8px;">
                                    <img src="../images/spacer.gif" alt="" width="8" height="8" />
                                </td>
                            </tr>
                            <tr>
                    <td style="padding-left: 2px; padding-top: 10PX; height: 20px;" align="left">
                        <asp:Button ID="btnBackToSearch" runat="server"  CssClass="buttonclass" 
                            Text="Back" onclick="btnBackToSearch_Click" />
                    </td>
                </tr>
                        </table>
                    </td>
                    <td class="bodytxt" style="border-right: 1px solid #E0E0E0; width: 10px;">
                        <img src="../images/spacer.gif" alt="" width="8" height="1" />
                    </td>
                    
                </tr>
                <tr>
                    <td class="bodytxt">
                        <img src="../images/grey-curver-inside-left-bot.gif" alt="" width="9" height="9" />
                    </td>
                    <td class="bodytxt" style="border-bottom: 1px solid #E0E0E0;">
                        <img src="../images/spacer.gif" alt="" width="8" height="1" />
                    </td>
                    <td class="bodytxt" style="width: 10px">
                        <img src="../images/grey-curver-inside-right-bo.gif" alt="" width="9" height="9" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <br />
</asp:Content>
